
/**
 * 生命值功能
 */

import DestructibleFacility from "../../facility/DestructibleFacility";
import Bullet from "../../flyer/DefenseFlyer/DefenseBullet";
import Flyer from "../../flyer/Flyer";
import Player from "../../player/Player";

export default interface HealthPoint {

    player: Player;

    node: cc.Node;

    hpProgress: cc.ProgressBar;

    maxHp: number;

    /**
     * 当前生命值
     */
    currentHp: number;

    initHp();

    repairHp(hp: number): void

    reducedHp(killer: Killer): boolean

    die(killer: Killer)

}

export type Killer = { player: Player, facility: DestructibleFacility, flyer?: Flyer, domage: number }
